import request from '@/utils/request'
//获取文章分类
export const artChannel = () => request.get('/my/cate/list')
//新增文章分类
export const artAddChannel = (data) => request.post('/my/cate/add', data)
//编辑文章分类
export const artEditChannel = (data) => request.put('/my/cate/info', data)
//删除文章分类
export const artDelChannel = (id) =>
  request.delete('/my/cate/del', {
    params: {
      id
    }
  })
//获取文章列表
export const artList = (params) =>
  request.get('/my/article/list', {
    params
  })
// 发布文章
export const artPublish = (data) => request.post('/my/article/add', data)
//获取文章详情
export const artGetList = (id) =>
  request.get('/my/article/info', {
    params: { id }
  })
//编辑文章
export const artEdit = (data) => request.put('/my/article/info', data)
//删除文章
export const artDel = (id) =>
  request.delete('my/article/info', { params: { id } })
